package com.kakarote.examine.service;

import com.kakarote.core.feign.examine.entity.ExamineAdvancedConfigBO;
import com.kakarote.core.feign.examine.entity.ExamineAdvancedConfigVO;
import com.kakarote.core.servlet.BaseService;
import com.kakarote.examine.entity.PO.ExamineAdvancedConfig;
import com.kakarote.examine.entity.PO.ExamineFlowFinal;
import com.kakarote.examine.entity.PO.ExamineRecord;
import com.kakarote.examine.entity.PO.ExamineRecordLog;

import java.util.List;

/**
 * <p>
 * 审批高级配置表 服务类
 * </p>
 *
 * @author zyl
 * @since 2022-08-30
 */
public interface IExamineAdvancedConfigService extends BaseService<ExamineAdvancedConfig> {

    /**
     * 新增或修改高级配置
     *
     * @param examineId               审批id
     * @param batchId                 审批批次id
     * @param examineAdvancedConfigBO 高级配置对象
     */
    public void addExamineAdvanceConfig(Long examineId, String batchId, ExamineAdvancedConfigBO examineAdvancedConfigBO);

    /**
     * 查询高级配置通过批次id
     *
     * @param batchId 批次id
     * @return 高级配置对象
     */
    public ExamineAdvancedConfigVO queryAdvancedConfig(String batchId);

    /**
     * 查询高级配置通过审批id
     *
     * @param examineId 审批id
     * @return 高级配置对象
     */
    public ExamineAdvancedConfigVO queryAdvancedConfigByExamineId(Long examineId);


    /**
     * 处理审批日志记录无有效审核人的问题
     *
     * @param recordLogList    审核日志列表
     * @param examineFlowFinal 最终审批流程
     * @param init             是否初始化
     * @param data             额外数据
     * @return 审核状态
     */
    public Integer handleRecordLogByAdvancedConfig(List<ExamineRecordLog> recordLogList, ExamineFlowFinal examineFlowFinal, Boolean init, Object data);


    /**
     * 处理审批日志记录无有效审核人的问题
     *
     * @param recordLogList           审核日志列表
     * @param examineFlowFinal        最终审批流程
     * @param init                    是否初始化
     * @param examineAdvancedConfigVO 配置对象
     * @param examineRecord           审核记录
     * @param data                    额外数据
     * @return 审核状态
     */
    public Integer handleRecordLogByAdvancedConfig(List<ExamineRecordLog> recordLogList, ExamineFlowFinal examineFlowFinal, Boolean init, ExamineAdvancedConfigVO examineAdvancedConfigVO, ExamineRecord examineRecord, Object data);

}
